/**
 * @param {string} s
 * @return {number}
 */
var lengthOfLastWord = function (s) {
  const arr = s.split(' ')
  let hasArr = arr.filter(item => item)
  return hasArr[hasArr.length - 1].length
}
